Class BinaryBoolInstruction<TValue, TValueType>
Base class for binary operator instructions with boolean output.
Assembly: WaaS.Core.dll
public abstract class BinaryBoolInstruction<TValue, TValueType> : Instruction where TValue : unmanaged where TValueType : struct, IValueType<TValue>
Inheritance: System.Object
-> WaaS.Models.Instruction
Derived:
Expand
WaaS.Models.EqF32, WaaS.Models.EqF64, WaaS.Models.EqI32, WaaS.Models.EqI64, WaaS.Models.GeF32S, WaaS.Models.GeF64S, WaaS.Models.GeI32S, WaaS.Models.GeI32U, WaaS.Models.GeI64S, WaaS.Models.GeI64U, WaaS.Models.GtF32, WaaS.Models.GtF64, WaaS.Models.GtI32S, WaaS.Models.GtI32U, WaaS.Models.GtI64S, WaaS.Models.GtI64U, WaaS.Models.LeF32S, WaaS.Models.LeF64S, WaaS.Models.LeI32S, WaaS.Models.LeI32U, WaaS.Models.LeI64S, WaaS.Models.LeI64U, WaaS.Models.LtF32, WaaS.Models.LtF64, WaaS.Models.LtI32S, WaaS.Models.LtI32U, WaaS.Models.LtI64S, WaaS.Models.LtI64U, WaaS.Models.NeF32, WaaS.Models.NeF64, WaaS.Models.NeI32, WaaS.Models.NeI64
Methods
Execute(WasmStackFrame)
Executes the instruction.
View Source
public override void Execute(WasmStackFrame current)
Parameters
Type | Name |
---|---|
WaaS.Runtime.WasmStackFrame | current |
Operate(TValue, TValue)
View Source
protected abstract bool Operate(TValue lhs, TValue rhs)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
<TValue> | lhs |
<TValue> | rhs |
PreValidateStackState(in ValidationContext)
Get the number of values to pop and push from the stack to validate stack depth.
View Source
public override (uint popCount, uint pushCount) PreValidateStackState(in ValidationContext context)
Returns
System.ValueTuple<System.UInt32,System.UInt32>
Parameters
Type | Name |
---|---|
WaaS.Models.ValidationContext | context |
ValidateStackState(in ValidationContext, ref ValidationBlockStackState)
Simulates stack operations to validate the stack state.
View Source
public override void ValidateStackState(in ValidationContext context, ref ValidationBlockStackState stackState)
Parameters
Type | Name |
---|---|
WaaS.Models.ValidationContext | context |
WaaS.Models.ValidationBlockStackState | stackState |